colorscheme molokai       " molokai color scheme
let g:molokai_original=1
set background=dark

set number                " set line number
set showcmd               " show command when type

" switch buffer
map <C-K> :bnext<CR>
map <C-J> :bprev<CR>

" switch tab
map <C-L> :tabn<CR>
map <C-H> :tabp<CR>

" Enable the list of buffers
let g:airline#extensions#tabline#enabled = 1

" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'

" quit buffer
map <leader>q :bd<CR>

" auto open the current file dir when open nerdtree
autocmd BufEnter * lcd %:p:h

" map the multiple_cursor_next_key back to C-n, C-s does not work
let g:multi_cursor_next_key='<C-n>'

" airline font fix
let airline_left_sep=''
let airline_right_sep=''

" indentLine for files indented with spaces
" let g:indentLine_enabled = 1
" let g:indentLine_color_term = 239
" let g:indentLine_char = '¦'

" for files indented with tabs
" set list lcs=tab:\|\

" remove highlighting search result quickly
map <leader>h :set hlsearch!<cr>

" keep swap files but keep it somewhere else
set swapfile
set dir=~/.vim_runtime/swapfiles

set backup
set backupdir=~/.vim_runtime/backupfiles
set writebackup
au BufWritePre * let &bex = '_' . strftime("%Y-%m-%d_%H:%M:%S")

" display file title of vim in title bar
set t_ts=]1;
set t_fs=
let &titlestring = expand("%:t") . " @ " . hostname()
set title

" share system clipboard
set clipboard=unnamed

" auto indenting
set ai

" disable folding
set nofoldenable

" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif

if has("autocmd")
  au BufEnter,BufRead *.conf setf dosini
endif
